package com.miracle.basemvp.network.download;

import io.reactivex.Observable;
import okhttp3.MultipartBody;
import okhttp3.ResponseBody;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Streaming;
import retrofit2.http.Url;

/**
 * com.miracle.basemvp.network.download
 * (c)2018 AIR Times Inc. All rights reserved.
 *
 *
 * @author WangJQ
 * @version 1.0
 * @date 2018/7/10 8:39
 * @see com.miracle.basemvp.network.download
 */
public interface FileApi {
    public static final String UPLOAD_URL = "http://111.231.226.202:8091/wecloud/upload";

    @Streaming
    @GET
    Observable<ResponseBody> download(@Url String url);

    @POST
    Observable<ResponseBody> uploadFile(@Url String url, @Body MultipartBody body);
}
